package cn.itcast.controller;

import cn.itcast.pojo.Result;
import cn.itcast.service.ReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/report")
public class ReportController {
    @Autowired
    private ReportService reportService;

    //5.1 员工性别统计
    @GetMapping("/empGenderData")
    public Result empGenderData() {
        return reportService.empGenderData();
    }

    //5.2员工职位人数统计
    @GetMapping("/empJobData")
    public Result empJobData() {

        return reportService.empJobData();
    }
    //5.3学员学历统计
    @GetMapping("/studentDegreeData")
    public Result studentDegreeData(){
        return reportService.studentDegreeData();
    }

    //5.4班级人数统计
    @GetMapping("/studentCountData")
    public Result studentCountData(){
        return reportService.studentCountData();
    }
}
